Skip to content

Add tsvector type support in DML adapter#796

Merged
kvch merged 2 commits into
xataio:mainfrom
utafrali:fix/issue-576-table-that-has-a-tsvector-column-doesn-t
May 19, 2026
Merged

Add tsvector type support in DML adapter#796
kvch merged 2 commits into
xataio:mainfrom
utafrali:fix/issue-576-table-that-has-a-tsvector-column-doesn-t

Conversation

@utafrali

Copy link
Copy Markdown
Contributor

Description

Fixes #576. Tables with tsvector columns were failing to replicate because the DML adapter didn't have a handler for that type. Added support by converting []byte values to strings before they get used in the copy operation.

Related Issues

#576

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changes Made

Added a case in updateValueForCopy to handle tsvector columns. When a tsvector value comes in as []byte from the WAL, it gets converted to a string. If it's already a string, it passes through unchanged.

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Added two test cases: one for []byte input (which is what the WAL produces) and one for string input to cover both scenarios.

Code Quality

  • Code passes linting
  • Code passes tests
  • Generated files are up to date

@kvch

kvch commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Thank you for this!

@kvch kvch merged commit 889b9ae into xataio:main May 19, 2026
6 of 7 checks passed
@kvch kvch added the backport-0.9.x Backport this PR to v0.9.x release label Jun 3, 2026
@xata-bot

xata-bot commented Jun 3, 2026

Copy link
Copy Markdown

Successfully created backport PR for v0.9.x:

kvch added a commit that referenced this pull request Jun 3, 2026
(cherry picked from commit 889b9ae)

Co-authored-by: Uğur Tafralı <tafraliugur@gmail.com>
Co-authored-by: Noémi Ványi <kvch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-0.9.x Backport this PR to v0.9.x release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table that has a tsvector column doesn't get replicated and exists the program

3 participants